<template>
  <div id="ChatPerson" @click="toChangeName">
    <a-icon class="user-icon" type="user" />
    <p class="user-name">{{ name }}</p>
    <!-- <div style="clear: both"></div> -->
  </div>
</template>

<script>
// import HelloWorld from "../components/HelloWorld.vue";

export default {
  name: "ChatPerson",
  props: ["name"],
  methods: {
    toChangeName() {
      this.$emit("toClick");
    },
  },
};
</script>

<style>
#ChatPerson {
  display: inline-block;
  border: 1px solid white;
  transition: all 0.5s;
  margin-bottom: 5px;
  width: auto;
  height: auto;
}

#ChatPerson:hover {
  border: 1px solid blue;
  color: white;
  background: blue;
  border-radius: 16px;
}

.user-icon {
  font-size: 30px;
  position: relative;
  top: 5px;
  left: 10px;
}
.user-name {
  display: inline-block;
  position: relative;
  top: 3px;
  margin: 0 10px 8px 20px;
  font-size: 25px;
}
</style>
